package org.clearjerk.model.character.status;

import java.util.ArrayList;
import java.util.List;

public class Limb {
	private String name;
	private List<Wound> wounds;
	private boolean isCritical;
	public Limb(String name, boolean isCritical) {
		this.name = name;
		wounds=new ArrayList<Wound>();
		this.setCritical(isCritical);
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<Wound> getWounds() {
		return wounds;
	}
	public void setWounds(List<Wound> wounds) {
		this.wounds = wounds;
	}
	public boolean isSevered(){
		for(Wound wound : wounds)
			if(wound.getWoundValue() == Wound.Severed)
				return true;
		return false;
	}
	public int bloodLoss(){
		int bloodLoss = 0;
		for(Wound wound : wounds)
			bloodLoss+= wound.getWoundValue();
		return bloodLoss;
	}
	public boolean isCritical() {
		return isCritical;
	}
	public void setCritical(boolean isCritical) {
		this.isCritical = isCritical;
	}
}
